package com.example.demo.test.lecture.algorithm;

import org.apache.commons.codec.binary.Base64;
import org.junit.Test;

public class ClimbStairs {
    
    @Test
    public void test() {
        System.out.println(claimbStairs(3));
    }

    public int claimbStairs(int n) {
        if (n == 1 ) {
            return 1;
        }
        int[] dp = new int[n + 1];
        dp[0] = 0;
        dp[1] = 1;
        dp[2] = 2;
        for (int i = 3; i <= n; i++) {
            dp[i] = dp[i - 1] + dp[i - 2];
        }
        return dp[n];
    }

    public static void main(String[] args) {
        String str = "+J1r+9t2kyLNbUoyHSpCchwjejoPsf2MOw9WPNcBeKkePFs5XSxyfrhOhq3QNNhJ/eOUv05805a/YGi5J96LMEIZ1UeXyf8TjVnfhJAYPyUBhIrfmmEamiDKkMIIxRIdDJXnsmFfqFyjoefsix0OiB+IM8HOO1eqbvVYMTG+103jRA0Becx5mSnQyGXiqSq/OS8oDp6jEeZR3e0yJaLbqsE7JHs3+NBi12ncKk07sWEEdhsV0S3sYsvWoJFhoRNnAzkd1p7+C9UAAHBBfKDTpTFc+TcIEKAGVWR1SyUD6pjWPpYVtqDc710SwSdhAqgbzIedy+Z+RScyJwX9oWHB3/P6dn9AieGPVeo4h3jWVhV/qVgzuXqQzPTNUzKlpq2k";
        str = "/+%王诶";
        byte[] butes = Base64.decodeBase64(str);
        String result = new String(butes);
        Base64.decodeBase64(result);
        System.out.println(result);
    }
}
